import type { Plugin } from "@vuepress/core";
import { path } from "@vuepress/utils";
import type { MusicPlayerOptions } from "../shared";

export * from "../shared";

const MusicPlayerOptions: Plugin<MusicPlayerOptions> = (options: MusicPlayerOptions, app) => {
  return {
    name: "vuepress-plugin-music-player",
    define: {
      __MUSIC_PLAYER_OPTIONS__: options
    },
    multiple: false,
    // clientAppEnhanceFiles: path.resolve(__dirname, "../client/clientAppEnhance.js"),
    clientAppRootComponentFiles: path.resolve(__dirname, "../client/components/MusicPlayer.vue"),
  };
};

export default MusicPlayerOptions;
